{extend  name="manage@public/layout" /}
{block name="content"}
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>商户日志</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link" onclick="location.replace(location.href);">
                                <i class="fa fa-refresh"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="table-responsive">
                            <!--- 搜索--->
                            <form action="" method="get">
                                <div class="col-sm-4 col-sm-on col-sm-auto">
                                    <input style="width:155px;cursor:not-allowed;" placeholder="开始日期" class="input-sm form-control form-control layer-date" name="start" value="{empty name="data['start']"}<?php echo date('Y-m-d 00:00:00',time());?>{else/}{$data.start}{/empty}" readonly id="start"><i style="position: relative;top:5px;">&nbsp;-&nbsp;</i>
                                    <input style="width:155px;cursor:not-allowed;" placeholder="结束日期" class="input-sm form-control form-control layer-date" name="end" value="{empty name="data['end']"}<?php echo date('Y-m-d 23:59:59',time());?>{else/}{$data.end}{/empty}" readonly id="end">
                                </div>
                                <div class="col-sm-1 col-sm-on">
                                    <div class="input-group">
                                        <button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-search"></i></button>
                                    </div>
                                </div>
                            </form>
                            <!--- end --->
                            <table class="table table-striped table-bordered">
                                <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>角色</th>
                                        <th>操作账号</th>
                                        <th>昵称</th>
                                        <th>操作内容</th>
                                        <th>ip</th>
                                        <th>操作时间</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {volist name="list" id="vo"}
                                    <tr>
                                        <td>{$vo.id}</td>
                                        <td>{eq name="vo.type" value="1"}商户{else/}代理商{/eq}</td>
                                        <td>{$vo.mid}</td>
                                        <td>{:\\app\\model\\Mch::getMch($vo.mid)}</td>
                                        <td>{$vo.action}</td>
                                        <td>{$vo.ip}</td>
                                        <td>{$vo.create_time}</td>
                                        <td>
                                            <span class="btn btn-sm btn-white"> <i class="fa fa-ban">&nbsp;暂无操作</i> </span>
                                        </td>
                                    </tr>
                                    {/volist}
                                </tbody>
                            </table>
                            <div style="float:right;" class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
                                {$page|raw}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div> 
    <input type='hidden' name="st_start" value="<?php echo date('Y-m-d 00:00:00',strtotime('-7 days'))?>" />
    <input type='hidden' name="st_end" value="<?php echo date('Y-m-d 23:59:59',time());?>" />
    {/block}

    {block name="script"}
    <script>
        //时间插件
        var start = {
            elem:"#start",
            format:"YYYY-MM-DD hh:mm:ss",
            min:$("input[name='st_start']").val(),
            max:$("input[name='st_end']").val(),
            istime:true,
        };
        var end = {
            elem:"#end",
            format:"YYYY-MM-DD hh:mm:ss",
            min:$("input[name='st_start']").val(),
            max:$("input[name='st_end']").val(),
            istime:true,
        };
        laydate(start);laydate(end);
       
    </script>
    {/block}